<%@page import="com.wodwl.entity.Bbs"%>
<%@page import="com.wodwl.entity.Blog"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.wodwl.entity.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<%@include file="../templete/header.jsp" %>
	<script type="text/javascript">
	$(document).ready(function() {   
				$.ajax({       
					type: "POST",   
					url: "/bbs/bbs_list.do", 
					contentType: "application/json; charset=utf-8", 
					dataType: "json",       
					data: "{}",  
					success: function(res) { 
						for(var i=0;i<res.length;i++){
							var item=res[i];
						}
						
					}   
					});
			}
		);
	
	
	function showAddBBS(){
		$("#addBBS").css("visibility","visible");
		$("#listBBS").css("visibility","hidden");
	}
	function goback(){
		$("#addBBS").css("visibility","hidden");
		$("#listBBS").css("visibility","visible");
	}
	function addBBS(){
		return false;
	}
	</script>
	<style type="text/css">
		#navigation1{
			border-bottom: 1px solid #00c;
		}
		#navigation1 ul {
			list-style-type: none;
			margin:  0px;
			padding: 0px;
		}
		#navigation1 li{
			float: left;
		}
		#navigation1 li a{
			display: block;
			padding: 3px 6px 3px 6px;
			text-decoration: none;
			border: 1px solid #711515;
			margin: 2px;
		}
		#navigation1 li a:LINK,#navigation1 li a:VISITED{
			background-color: #c11136;
			color: #ffffff;
		}
		
		#navigation1 li a:HOVER {
			background-color: #990020;
			color: #ffff00;
		}
		
	
	</style>
</head>
<body >
<%
	pageContext.setAttribute("linkType","3");
%>
<%@include file="../templete/user_info.jsp"  %>

	<%
		//List<Forum> bbss=(List<Forum>) request.getAttribute("bbss");
		List<Bbs> bbss=new ArrayList<Bbs>();
	%>
			
			<div id="navigation1">
				<ul>
					<li><a href="#">我的论坛</a></li>
					<li><a href="#">精彩论坛</a></li>
					<li><a href="#">论坛板块</a></li>
				</ul>
			</div>
			
			
			
			<!-- 帖子列表 -->
			<div id="listBBS">
				<div id="op">
					<span onclick="showAddBBS()"><a href="#">发帖</a></span>|
					<span><a href="#">设置</a></span>
				</div>
				<div>
					<p class="pager-wrap pageList">
						<span class="pageList-cur">1</span> <a href="#" class="link-lb">2</a>
						<a href="#" class="link-lb">3</a> <a class="link-lb" href="#">下一页</a>
					</p>
				</div>
			</div>
			
			
			
			<!-- 发帖 -->	
			<div id="addBBS" style=" visibility:hidden;">
				<form action="/bbs/bbs_add.do" method="post" onsubmit="return addBBS();">
					 <input type="hidden" name="username" value="<%=user.getUsername() %>" >
					 <input type="hidden" name="category" value="科技">
					<table>
						<tr>
							<td>标题：</td><td><input id="input_title" type="text" name="title" size="50"></td>
						</tr>
						
						<tr>
							<td colspan="2"><textarea id="textarea_content" name="content"  id="content" cols="60" rows="20"></textarea></td>
						</tr>
						<tr>
							<td ><input type="submit" value="提交" ></td>
							<td ><input id="back" type="button" value="返回" onclick="goback();"></td>
						</tr>
					</table>
				</form>
			</div>
		





	<jsp:include page="../templete/footer.jsp"></jsp:include>

</body>
</html>